package com.IR.order.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.IR.shop.mapper.PreorderMapper;
import com.IR.shop.po.Preorder;
import com.IR.shop.po.PreorderExample;

@Service
public class BPreorderBiz {
	@Resource
	public PreorderMapper preordermapper;
	
	public List<Preorder> showPreorderAll2(Long userid){
		PreorderExample example=new PreorderExample();
		PreorderExample.Criteria c=example.createCriteria();
		c.andUseridEqualTo(userid);
		return preordermapper.selectByExample(example);
	}
	public List<Preorder> showPreorderAll(){
		PreorderExample example=new PreorderExample();
		
		return preordermapper.selectByExample(example);
	}
	public List<Preorder> showPreorderby(){
		PreorderExample example=new PreorderExample();	
		example.setOrderByClause("preorderid DESC");
		return preordermapper.selectByExample(example);
	}
}
